package com.tarena.shoot;

import java.util.Random;

/**子弹：是飞行物*/
public class Bullet extends FlyingObject {
	private int speed = 3;
	/**构造方法*/
	public Bullet(int x,int y) {
		image = ShootGame.bullet;
		width = image.getWidth();
		height = image.getHeight();
		Random rand = new Random();
		this.x = x;
		this.y = y;
	}
	
	public void step() {
		y -= speed;
	}
	
	public boolean outOfBounds() {
		return y < -height;
	}
}
